`:top
`!Razor`! is an `F33f`_`[ASP.NET`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=ASP.NET]`_`f programming syntax used to create `F33f`_`[dynamic web pages`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Dynamic_web_page]`_`f with the `F33f`_`[C#`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=C_Sharp_(programming_language)]`_`f or `F33f`_`[VB.NET`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Visual_Basic_.NET]`_`f programming languages. Razor was in development in June 2010`:cite-ref-introducingrazor-4-0[`F5bf`_`[4`#cite-note-introducingrazor-4]`_`f] and was released for Microsoft `F33f`_`[Visual Studio`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Visual_Studio]`_`f 2010 in January 2011.`:cite-ref-razorsyntaxsupport-5-0[`F5bf`_`[5`#cite-note-razorsyntaxsupport-5]`_`f] Razor is a simple-syntax view engine and was released as part of `F33f`_`[MVC`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=ASP.NET_MVC]`_`f 3 and the `F33f`_`[WebMatrix`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=WebMatrix]`_`f tool set.`:cite-ref-razorsyntaxsupport-5-1[`F5bf`_`[5`#cite-note-razorsyntaxsupport-5]`_`f]
Razor became a component of AspNetWebStack and then became a part of `F33f`_`[ASP.NET Core`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=ASP.NET_Core]`_`f.`:cite-ref-6[`F5bf`_`[6`#cite-note-6]`_`f]
>>Contents
• `F0af`_`[Design`#design]`_`f
• `F0af`_`[See also`#see-also]`_`f
• `F0af`_`[References`#references]`_`f
• `F0af`_`[External links`#external-links]`_`f
-─
>>Design
The Razor syntax is a template markup syntax, based on the C# programming language, that enables the programmer to use an HTML construction workflow. Instead of using the ASP.NET Web Forms (.aspx) markup syntax with `B100`F9d9<%= %>`f`b symbols to indicate code blocks, Razor syntax starts code blocks with an `B100`F9d9@`f`b character and does not require explicit closing of the code-block.
The idea behind Razor is to provide an optimized syntax for HTML generation using a code-focused templating approach, with minimal transition between HTML and code.`:cite-ref-mvc3rve-7-0[`F5bf`_`[7`#cite-note-mvc3rve-7]`_`f] The design reduces the number of characters and keystrokes, and enables a more fluid coding workflow by not requiring explicitly denoted server blocks within the HTML code.`:cite-ref-introducingrazor-4-1[`F5bf`_`[4`#cite-note-introducingrazor-4]`_`f] Other advantages that have been noted:`:cite-ref-pro1-8-0[`F5bf`_`[8`#cite-note-pro1-8]`_`f]
• Supports `F33f`_`[IntelliSense`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=IntelliSense]`_`f – statement completion support
• Supports "layouts" – an alternative to the "master page" concept in classic `F33f`_`[Web Forms`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=ASP.NET_Web_Forms]`_`f (.aspx)
• `F33f`_`[Unit testable`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Unit_testing]`_`f
>>See also
• `F33f`_`[Blazor`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Blazor]`_`f
>>References
`:cite-note-1`!1.`! "Microsoft ASP.NET Razor". `*`F33f`_`[NuGet`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=NuGet]`_`f`*.
`:cite-note-2`!2.`! "Introduction to Razor Pages in ASP.NET Core". `*learn.microsoft.com`*. 27 September 2024.
`:cite-note-3`!3.`! "Razor/LICENSE.txt at master · aspnet/Razor · GitHub". `*GitHub`*. 12 October 2022.
`:cite-note-introducingrazor-4`!4.`! `F0af`_`[↑`#cite-ref-introducingrazor-4-0]`_`f "ScottGu's Blog - Introducing "Razor" – a new view engine for ASP.NET". `*asp.net`*. 3 July 2010.
`:cite-note-razorsyntaxsupport-5`!5.`! `F0af`_`[↑`#cite-ref-razorsyntaxsupport-5-0]`_`f "MSDN Blogs". `*msdn.com`*. Microsoft. Archived from the original on 2012-07-02. Retrieved 2011-07-08.
`:cite-note-6`!6.`! `F0af`_`[↑`#cite-ref-6]`_`f `:citerefchadwick2011`aChadwick, Jess (9 September 2011). `*Programming Razor: Tools for Templates in ASP.NET MVC or WebMatrix`*. "O'Reilly Media, Inc.". `F33f`_`[ISBN`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=ISBN_(identifier)]`_`f 978-1-4493-1716-4.
`:cite-note-mvc3rve-7`!7.`! `F0af`_`[↑`#cite-ref-mvc3rve-7-0]`_`f `:citerefjon-galloway2020`aJon Galloway (19 February 2020). "MVC 3 - Razor View Engine". `*The Official Microsoft ASP.NET Site`*.
`:cite-note-pro1-8`!8.`! `F0af`_`[↑`#cite-ref-pro1-8-0]`_`f "ASP.NET MVC View Engine Comparison". `*stackoverflow.com`*.
>>External links
Wikibooks has a book on the topic of:
.NET Development Foundation
• Introduction to Razor Pages in ASP.NET Core at `F33f`_`[Microsoft Docs`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Microsoft_Docs]`_`f
• ASP.NET Web Pages at `F33f`_`[Microsoft Docs`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Microsoft_Docs]`_`f
• Overview of ASP.NET Core MVC at `F33f`_`[Microsoft Docs`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Microsoft_Docs]`_`f
• ASP.NET MVC at `F33f`_`[Microsoft Docs`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Microsoft_Docs]`_`f
• Razor on `F33f`_`[GitHub`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=GitHub]`_`f (archived). Current development is held at aspnetcore on `F33f`_`[GitHub`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=GitHub]`_`f
`c`F0af`_`[↑ Back to top`#top]`_`f`a